﻿using System.Windows.Media.Media3D;

namespace Wen.UI.NavigationElements
{
    internal class CameraPositionViewModel : CameraXyzControlViewModelBase
    {
        private readonly Point3D _stockPosition;

        public CameraPositionViewModel(ProjectionCamera camera)
            : base(camera) {
            _stockPosition = Camera.Position;
        }

        protected override void ApplyXMovement(double step) {
            Camera.Position = new Point3D(Camera.Position.X + step, Camera.Position.Y, Camera.Position.Z);
        }

        protected override void ApplyYMovement(double step) {
            Camera.Position = new Point3D(Camera.Position.X, Camera.Position.Y + step, Camera.Position.Z);
        }

        protected override void ApplyZMovement(double step) {
            Camera.Position = new Point3D(Camera.Position.X, Camera.Position.Y, Camera.Position.Z + step);
        }

        protected override void Reset() {
            Camera.Position = _stockPosition;
        }

    	protected override Point3D RawCoords
    	{
			get { return Camera.Position; }
    	}
    }
}
